# uncompyle6 version 3.2.3
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.8 |Anaconda custom (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]
# Embedded file name: site-packages\PyInstaller\__init__.py
__all__ = ("HOMEPATH", "PLATFORM", "__version__")
import os, sys
from . import compat
from .compat import is_darwin, is_win, is_cygwin, is_py2, is_linux
from .utils.git import get_repo_revision

__version__ = "3.3.1"
PACKAGEPATH = os.path.abspath(os.path.dirname(__file__))
HOMEPATH = os.path.dirname(PACKAGEPATH)
if is_win:
    if is_py2:
        pass
try:
    unicode(HOMEPATH)
except UnicodeDecodeError:
    try:
        HOMEPATH = compat.win32api.GetShortPathName(HOMEPATH)
    except ImportError:
        pass

if os.path.exists(os.path.join(HOMEPATH, "setup.py")):
    if compat.getenv("PYINSTALLER_DO_RELEASE") == "1":
        pass
    else:
        if "sdist" not in sys.argv:
            try:
                __version__ += get_repo_revision()
            except Exception:
                sys.stderr.write("WARN: failed to parse git revision")

        else:
            import pkg_resources

            __version__ = pkg_resources.get_distribution("PyInstaller").version
        DEFAULT_SPECPATH = compat.getcwd()
        DEFAULT_DISTPATH = os.path.join(compat.getcwd(), "dist")
        DEFAULT_WORKPATH = os.path.join(compat.getcwd(), "build")
        PLATFORM = compat.system() + "-" + compat.architecture()
        if compat.machine():
            PLATFORM += "-" + compat.machine()
